import scrapy


class MiddleSpider(scrapy.Spider):
    name = 'middle'
    # allowed_domains = ['www']
    start_urls = ['http://www.baidu.com/s?wd=ip']

    def parse(self, response):
        with open('ip.html','w',encoding='utf-8') as fp:
            fp.write(response.text)
